var log = null;

if (wx.getRealtimeLogManager) {
  log = wx.getRealtimeLogManager();
}

var logs = {
  info(...args) {
    if (!log) return;
    console.log(args);
    log.info.apply(log, args);
  },
  warn(...args) {
    if (!log) return;
    console.log(args);
    log.warn.apply(log, args);
  },
  error(...args) {
    if (!log) return;
    console.log(args);
    log.error.apply(log, args);
  },
};

export default logs;